package com.homewoek;

import java.io.*;

/**
 * @Author:Ren2048
 * @Date:2021/8/27
 * @Description:com.edu
 * @Version:1.8.0_261
 */
public class StreamTest {
    public static void main(String[] args) {
        File fromFile = new File("C:\\Windows\\win.ini");
        InputStream is = null;
        try{
            is = new FileInputStream(fromFile);
            int count = is.read();
            while(count != -1){
                System.out.println(count);
                count = is.read();
            }
        }catch (IOException ie){
            ie.printStackTrace();
        }finally {
            try{
                is.close();
            }catch (IOException ie){
                ie.printStackTrace();
            }
        }
    }
}
